/********************************************************************************
 * Project Name		[JavaSE_Fundamentals]
 * File Name     	[LoginServlet.java]
 * Creation Date 	[2015-01-01]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ********************************************************************************/
package jdk5.annotation.cases.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import jdk5.annotation.cases.annotation.WebInitParam;
import jdk5.annotation.cases.annotation.WebServlet;

/**
 * @author 不落的太阳(Sean Yang aka ShortPeace)
 * @version 1.0
 * @since jdk 1.8
 * 
 */
@WebServlet(value = "/loginServlet", initParams = { @WebInitParam(paramName = "User", paramValue = "Annotation") })
public class LoginServlet extends HttpServlet {

	private static final long serialVersionUID = -6677719723055669854L;

	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		response.getWriter().write("Hello World");
		System.out.println("doGet....");
	}

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		System.out.println("doPost....");
	}
}
